﻿using HandyControl.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfDemo.Common
{
    public class BaseDialogViewModel : IDialogService
    {
        public void ShowDialog(string name)
        {
            //ShowDialog(name, Activator.CreateInstance(typeof(DialogViewModel)) as DialogViewModel);
        }

        public void ShowDialog<T>(string name, T viewModel) where T : BaseDialogViewModel
        {
            //var dialog = new Dialog
            //{
            //    DataContext = viewModel,
            //    Content = new DialogView { DataContext = viewModel }
            //};
            //dialog.SetResourceReference(ContentProperty, name);
            //dialog.ShowDialog();
        }
    }
    public interface IDialogService
    {
        void ShowDialog(string name);
        void ShowDialog<T>(string name, T viewModel) where T : BaseDialogViewModel;
    }

}
